package com.qfedu.spring.mvc.controller;

import com.qfedu.spring.mvc.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @auther asus
 * @date 2022/5/9 23:55
 */
@Controller
@RequestMapping("ajax")
public class AjaxController {
    @RequestMapping(value = "test1",produces = "text/html;charset=utf-8")
    @ResponseBody
    public String test1(@RequestBody User user){
        System.out.println(user);
        return "发送成功";
    }
}
